import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/icon/iconfont.css'
import tagCloud from 'v-tag-cloud'
// 注册mavon-editor组件
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
Vue.use(mavonEditor);

import './assets/js/hljs'
import hljs from 'highlight.js'
import 'highlight.js/scss/atom-one-light.scss'
Vue.directive('highlight', function(el) {
    hljs.configure({ useBR: true });
    let blocks = el.querySelectorAll('pre code');
    blocks.forEach((block) => {
        hljs.highlightBlock(block)
    })
})

// import loading from '@/components/loading/index.js'
// Vue.use(loading)

Vue.use(tagCloud)
Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')